package adv2;

public class Teststr1 {

	public static void main(String[] args) {
		String s = "a";
		// s += 4 + 2 + 5;
		s = s + "b" + 4 + 2 + 5;
		System.out.println(s);
		String s1 = "abc";
		String s3 = "abc";
		String s2 = new String("abc");// .intern()
		System.out.println(s1 == s2);// false
		System.out.println(s1 == s3);// true
		// System.out.println(s2.hashCode());

		System.out.println("s1=" + System.identityHashCode(s1));
		System.out.println("s2=" + System.identityHashCode(s2));
		System.out.println("s3=" + System.identityHashCode(s3));
	}
}
